/**
 * Copyright (c) 2016-2019  All rights reserved.
 *
 * https://www.yuncheng.io
 *
 * 版权所有，侵权必究！
 */

package io.yuncheng.modules.sys.controller;

import io.yuncheng.modules.sys.service.SysLogService;
import io.yuncheng.common.utils.PageUtils;
import io.yuncheng.common.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * 系统日志
 *
 * @author Mark sunlightcs@gmail.com
 */
@RestController
@RequestMapping("/sys/log")
@Api(tags = "系统日志查询")
public class SysLogController {
	@Autowired
	private SysLogService sysLogService;

	/**
	 * 列表
	 */
	@GetMapping("/list")
	@ApiOperation("日志查询")
	@RequiresPermissions("sys:log:list")
	public R list(@RequestParam Map<String, Object> params){
		PageUtils page = sysLogService.queryPage(params);

		return R.ok().put("page", page);
	}

}
